<?php

declare(strict_types=1);
// 默认控制器
namespace app\net2023dev\controller;


class Index
{
    public function index()
    {
        // 文档  https://doc.thinkphp.cn/v8_0/request_info.html
        return $this->hello()
            . '<br>TP版本:' . \think\facade\App::version()
            . "<br>模块:默认控制器 Index.php"
            . "<br>应用名:" . app('http')->getName()
            . "<br>域名/IP:" .  request()->host()
            . "<br>url地址:" . request()->url()
            . "<br>url地址:" . \think\facade\Request::url()
            . "<br>时间:" . date('Y-m-d H:i:s', time());
    }
    public function hello($name = 'ThinkPHP8')
    {
        return $name;
    }
}
